import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 挂载一些基础组件到全局
import './components/Basics/index.js'
// 引入mock
import './mock/index.js'

import './assets/style/reset.css'
import './assets/style/global.css'

// 使用一些插件
import VueWechatTitle from "vue-wechat-title"

Vue.use(VueWechatTitle)

// 取消生产中过多的提示打印
Vue.config.productionTip = false

new Vue({
	computed:{
		// 异步加载状态
		loading(){
			return this.$store.state.global.loading;
		},
		// 是否显示浮窗
		popsShow(){
			return this.$store.state.global.popsShow;
		}
	},
	mounted(){
		// 加载上次用户登录的数据
		this.$store.dispatch('users/whoAmI');
	},
  router,
  store,
  render: h => h(App)
}).$mount('#app')
